// src/main/java/com/neusoft/SPNursingHome/service/BedRecordService.java
package com.neusoft.SPNursingHome.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neusoft.SPNursingHome.po.BedRecord;
import com.neusoft.SPNursingHome.po.BedRecordWithClient;
import com.neusoft.SPNursingHome.po.ResponseBean;

import java.util.Date;
import java.util.List;

public interface BedRecordService {
    /** 查询所有（不分页） */
    ResponseBean<List<BedRecord>> listAll();

    /** 分页查询 */
    ResponseBean<IPage<BedRecord>> listPage(long page, long size);

    /** 根据 ID 查询 */
    ResponseBean<BedRecord> getById(Integer id);

    /** 新增 */
    ResponseBean<Void> create(BedRecord record);

    /** 更新 */
    ResponseBean<Void> update(BedRecord record);

    /** 删除 */
    ResponseBean<Void> deleteById(Integer id);

    /**
     * 调换床位：结束旧记录 + 更新旧床位状态 + 新建记录 + 更新新床位状态
     */
    ResponseBean<Void> swapBed(Integer oldBedId, Integer newBedId,Date newBeginTime,Date newEndTime);
    ResponseBean<IPage<BedRecordWithClient>> listWithClientByCondition(
            String clientName,
            Date beginTime,
            Date endTime,
            Integer bedRecordStatus,
            long page,
            long size
    );
}
